package cn.ilikes.tools.nosql.test.jpa.pojos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_employess", schema = "ilikes")
public class Employees {

	@Id
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;
	@Column(name = "employe_id")
	@IndexColumn(index = IndexColumn.Index.not_analyzed, name = "employeId", store = IndexColumn.Store.no)
	private String employeId;
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employees")
	private List<DeptEmployeMaps> deptEmployeMaps;

	public List<DeptEmployeMaps> getDeptEmployeMaps() {
		return deptEmployeMaps;
	}

	public void setDeptEmployeMaps(List<DeptEmployeMaps> deptEmployeMaps) {
		this.deptEmployeMaps = deptEmployeMaps;
	}

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	public String getEmployeId() {
		return employeId;
	}

	public void setEmployeId(String employeId) {
		this.employeId = employeId;
	}

}
